#ifndef OBJECT_H
#define OBJECT_H

#include <pthread.h>
class Object
{
    public:
        Object();
        virtual ~Object();
        bool isNew(int n){ return n!=m_new;}
        bool isInit(){return m_new!=-1;}
        void initData(void *data,int size);
        int readData(void * data);
        int writeData(void *data);
    protected:
    private:
        int m_new;
        int m_size;
        void * m_address;
        pthread_rwlock_t m_rwlock;
};
extern Object fa;
#endif // OBJECT_H
